package com.lyh.system.service.impl;

import java.util.List;

import com.lyh.system.domain.req.OPerPageReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lyh.system.mapper.OperationInfoMapper;
import com.lyh.system.domain.OperationInfo;
import com.lyh.system.service.IOperationInfoService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 收支明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-11
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class OperationInfoServiceImpl implements IOperationInfoService 
{
    @Autowired
    private OperationInfoMapper operationInfoMapper;

    /**
     * 查询收支明细
     * 
     * @param id 收支明细主键
     * @return 收支明细
     */
    @Override
    public OperationInfo selectOperationInfoById(Long id)
    {
        return operationInfoMapper.selectOperationInfoById(id);
    }

    /**
     * 查询收支明细列表
     * 
     * @param operationInfo 收支明细
     * @return 收支明细
     */
    @Override
    public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo)
    {
        return operationInfoMapper.selectOperationInfoList(operationInfo);
    }

    @Override
    public List<OperationInfo> operationInfoPage(OPerPageReq req) {
        return operationInfoMapper.operationInfoPage(req);
    }

    /**
     * 新增收支明细
     * 
     * @param operationInfo 收支明细
     * @return 结果
     */
    @Override
    public int insertOperationInfo(OperationInfo operationInfo)
    {
        return operationInfoMapper.insertOperationInfo(operationInfo);
    }

    /**
     * 修改收支明细
     * 
     * @param operationInfo 收支明细
     * @return 结果
     */
    @Override
    public int updateOperationInfo(OperationInfo operationInfo)
    {
        return operationInfoMapper.updateOperationInfo(operationInfo);
    }

    /**
     * 批量删除收支明细
     * 
     * @param ids 需要删除的收支明细主键
     * @return 结果
     */
    @Override
    public int deleteOperationInfoByIds(Long[] ids)
    {
        return operationInfoMapper.deleteOperationInfoByIds(ids);
    }

    /**
     * 删除收支明细信息
     * 
     * @param id 收支明细主键
     * @return 结果
     */
    @Override
    public int deleteOperationInfoById(Long id)
    {
        return operationInfoMapper.deleteOperationInfoById(id);
    }
}
